<g:formRemote name="frmDevChkList" update="editChecklist" before="if (CKEDITOR.instances['checklistContent']) {document.getElementById('checklistContent').value= CKEDITOR.instances['checklistContent'].getData()}" url="[controller:'developmentChecklist', action:'saveChecklist' ]">
	<g:flashMessage/>
	<g:hasErrors bean="${developmentChecklistInstance}">
	
		<ul class="errors" role="alert">
			<g:eachError bean="${developmentChecklistInstance}" var="error">
			<li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
			</g:eachError>
		</ul>
	</g:hasErrors>
	
	<g:hiddenField name="id" value="${developmentChecklistInstance.id }"/>
	<div class="fieldcontain ${hasErrors(bean: developmentChecklistInstance, field: 'description', 'error')} ">
		<label for="description">
			<g:message code="developmentChecklist.description.label" default="Description" />
			
		</label>
		<g:textField name="description" maxlength="255" value="${developmentChecklistInstance?.description}"/>
	</div>
	
	<div class="fieldcontain ${hasErrors(bean: developmentChecklistInstance, field: 'status', 'error')} required">
		<label for="status">
			<g:message code="developmentStatus.status.label" default="Status" />
			<span class="required-indicator">*</span>
		</label>
		<g:select id="status" name="status.id" from="${edu.uow.devdocs.DevelopmentChecklistStatus.list()}" optionKey="id" required="" value="${developmentChecklistInstance?.status?.id}" class="many-to-one"/>
	</div>
	
	<br/>
	
	<g:if test="${developmentChecklistInstance?.checklist?.renderHtmlFlag }">
		<ckeditor:config var="toolbar_Mytoolbar">
		[
		    [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ],
		    [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ],
		    [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ],
		    [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ],
		    [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ],
		    [ 'Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ],
		    [ 'Styles','Format','Font','FontSize' ],
		    [ 'TextColor','BGColor' ],
		    [ 'Maximize', 'ShowBlocks','-','About' ]
		    
		]
		</ckeditor:config>
		<script>if (CKEDITOR.instances['checklistContent']) {delete CKEDITOR.instances['checklistContent']}</script>
		<ckeditor:editor name="checklistContent" toolbar="Mytoolbar">
		<%= developmentChecklistInstance?.checklistContent%>
		</ckeditor:editor>
	</g:if>
	<g:if test="${! developmentChecklistInstance?.checklist?.renderHtmlFlag }">
		<g:textArea cols="80" name="checklistContent">${developmentChecklistInstance?.checklistContent}</g:textArea>
	</g:if>
	
	<br/>
	<fieldset class="buttons">
		<g:submitButton name="updateChkList" update="editChecklist" class="save" value="${message(code: 'default.button.update.label', default: 'Update')}" />
	</fieldset>
</g:formRemote>